"""
对象的多态性
"""
class Animal:
    def eat(self):
        print("1111")

class Dog(Animal):
    def eat(self):
        print("22222")

def eat(temp):
    temp.eat()

animal = Animal()
dog = Dog()
eat(animal)
eat(dog)